Skip to content

feat: add one-line install script#1

Open
AsafManela wants to merge 6 commits intomeleantonio:mainfrom
AsafManela:amanela/install-script
Open

feat: add one-line install script#1
AsafManela wants to merge 6 commits intomeleantonio:mainfrom
AsafManela:amanela/install-script

Conversation

@AsafManela
Copy link
Copy Markdown

@AsafManela AsafManela commented Feb 8, 2026

Summary

  • Add install.sh script that automates the Quick Start installation process
  • Update README.md with curl one-liner for easy installation
  • Installs everything including personal CLAUDE.md by default

Changes

  • install.sh: New installation script that:

    • Creates required directories (~/.claude/skills, ~/.claude/agents, etc.)
    • Installs Claude Code and Cursor personal skills and subagents
    • Installs personal CLAUDE.md by default
    • If CLAUDE.md exists: prompts in interactive mode, skips in non-interactive
    • Works both locally (./install.sh) and via curl (curl ... | bash)
  • README.md: Added "One-Line Install" section with curl command

Test plan

  • Run ./install.sh locally - verified files install to correct locations
  • Test curl one-liner: curl -fsSL .../install.sh | bash - installs everything including CLAUDE.md
  • Verify skills installed as subdirectories with SKILL.md files
  • Verify subagents installed as .md files
  • Re-run installer with existing CLAUDE.md - skips with warning in non-interactive mode

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a one-line installer that automates setup of skills, subagents, and config into user directories; shows a summary of installed items and next steps and handles interactive/non-interactive installs.
  • Documentation

    • Updated Quick Start to include the one-line install and added a Manual Installation path with explicit commands for creating directories and copying components; standardized headings for clarity.

AsafManela and others added 5 commits February 8, 2026 14:16
Add install.sh that automates the Quick Start installation process:
- Creates required directories (~/.claude/skills, ~/.claude/agents, etc.)
- Installs Claude Code and Cursor personal skills and subagents
- Optionally installs personal CLAUDE.md
- Works both locally and via curl pipe to bash

Update README.md with curl one-liner for easy installation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When running via curl | bash, stdin is not a TTY so the read prompt
doesn't work. Now detects non-interactive mode and shows a curl command
users can run to manually install CLAUDE.md.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CLAUDE.md is now installed automatically (not optional)
- If file exists: prompt to overwrite in interactive mode, skip in non-interactive
- Simplifies the curl one-liner experience

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

Adds a new Bash installer (install.sh) and updates README.md to replace the original copy-first Quick Start with a one-line curl installer plus an expanded manual installation path that details directory creation and copying of Claude and Cursor assets.

Changes

Cohort / File(s) Summary
Documentation
README.md
Replaced Quick Start with a one-line curl-based install flow; added a Manual Installation path with explicit directory creation and file copy commands for Claude Code and Cursor assets; adjusted heading levels for consistency.
Installer Script
install.sh
New installer that uses local repo if present or clones a temp repo, creates ~/.claude and ~/.cursor target directories, copies personal skills and subagents for Claude and Cursor, installs CLAUDE.md (prompting on conflict), and prints a summary with colored logging and error handling.

Sequence Diagram

sequenceDiagram
    participant User
    participant Installer as install.sh
    participant Repo as Repository
    participant FS as File\ System

    User->>Installer: Run installer (curl|bash or local)
    Installer->>FS: Check for local source dirs (claude_personal_skills...)
    alt source present
        Installer->>FS: Set SOURCE_DIR = local repo
    else source absent
        Installer->>Repo: git clone to temp dir
        Repo-->>Installer: cloned repo
        Installer->>FS: Set SOURCE_DIR = temp clone
    end
    Installer->>FS: Create target dirs (~/.claude, ~/.cursor, subdirs)
    Installer->>FS: Copy SOURCE_DIR/claude_personal_skills/* -> ~/.claude/skills/
    Installer->>FS: Copy SOURCE_DIR/claude_subagents/* -> ~/.claude/agents/
    Installer->>FS: Copy SOURCE_DIR/cursor_personal_skills/* -> ~/.cursor/skills-cursor/
    Installer->>FS: Copy SOURCE_DIR/cursor_subagents/* -> ~/.cursor/agents/
    Installer->>FS: Check ~/.claude/CLAUDE.md
    alt CLAUDE.md missing
        Installer->>FS: Install CLAUDE.md
    else CLAUDE.md exists
        Installer->>User: Prompt to overwrite (interactive) or skip (non-interactive)
    end
    Installer->>User: Print summary and next steps
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A curl and a script hopped into play,
Copying skills to their new home today,
Claude and Cursor, files in a row,
One-line install — off they go! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: adding a one-line install script with supporting documentation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 36-37: The trap currently expands TEMP_DIR at definition time and
leaves it unquoted; change the trap to avoid early expansion and quote the
variable by replacing trap "rm -rf $TEMP_DIR" EXIT with a single-quoted/trapped
command that quotes the variable, e.g. use trap 'rm -rf "$TEMP_DIR"' EXIT so
mktemp -d output is removed safely even if it contains spaces (addresses SC2064
and unquoted variable risk); locate the TEMP_DIR assignment and the trap
invocation to apply this change.
- Around line 28-33: SCRIPT_DIR detection is unreliable when the script is piped
via curl because BASH_SOURCE[0] can be empty and dirname "" resolves to ".",
causing false positives for CLAUDE.md; update the logic that sets SCRIPT_DIR and
SOURCE_DIR (symbols: SCRIPT_DIR, BASH_SOURCE, SOURCE_DIR, CLAUDE.md) to first
detect piped stdin (e.g., test if stdin is not a TTY or if BASH_SOURCE is empty)
and only treat the repo-as-local when BASH_SOURCE points to an actual file and a
stronger repo marker exists (e.g., a skills/ directory or .git), otherwise fall
back to cloning/remote install path; ensure the info log still runs when truly
local but avoid using CWD as SOURCE_DIR when BASH_SOURCE is unset.
🧹 Nitpick comments (1)
README.md (1)

21-34: Consider adding a note about reviewing the script before piping to bash.

The curl | bash pattern is standard for developer tools, but security-conscious users appreciate the option to inspect first. A brief note would be a nice addition.

Suggested addition
 curl -fsSL https://raw.githubusercontent.com/meleantonio/ChernyCode/main/install.sh | bash

+> Tip: To review the script before running, download it first with curl -fsSL … -o install.sh, inspect it, then run bash install.sh.

</details>

</blockquote></details>

</blockquote></details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

- Check BASH_SOURCE[0] is set and verify claude_personal_skills dir
  exists to avoid false-positive local-repo detection when piped via
  curl | bash
- Use single-quoted trap to properly handle paths with spaces (SC2064)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 34-42: Add a pre-check for the git binary and stop suppressing git
clone diagnostics: before using TEMP_DIR and running git clone, verify git is
available (e.g. check command -v git or which git) and call error with a clear
message like "git is required, please install git" if missing; remove the
redirection "2>/dev/null" from the git clone invocation so clone failures
surface real diagnostics (authentication/DNS/permission errors) and keep the
existing fallback that calls error "Failed to clone repository. Check your
internet connection." to preserve behavior when clone actually fails.
- Around line 124-125: Before calling cp, ensure the source file exists: add a
test for [[ -f "$SOURCE_DIR/CLAUDE.md" ]] and only run cp
"$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md when that check passes; if the file
is missing, emit a clear message (using echo or logger) indicating
SOURCE_DIR/CLAUDE.md was not found and either skip the copy or exit with a
helpful error. Reference the variables/commands SOURCE_DIR, CLAUDE.md, and cp to
locate the exact spot to change.
🧹 Nitpick comments (1)
install.sh (1)

61-119: Consider extracting a helper to reduce the repeated install pattern.

All four install blocks (Claude skills, Claude agents, Cursor skills, Cursor agents) follow the same structure: check source dir exists → iterate entries → copy → log. A small helper function would cut the duplication.

Example helper
install_assets() {
    local label="$1" src_dir="$2" dest_dir="$3" pattern="$4"
    info "Installing $label..."
    if [[ ! -d "$src_dir" ]]; then
        warn "  No $label found"; return
    fi
    for item in "$src_dir"/$pattern; do
        [[ -e "$item" ]] || continue
        cp -r "${item%/}" "$dest_dir/"
        success "  Installed: $(basename "$item")"
    done
}

install_assets "Claude Code personal skills" "$SOURCE_DIR/claude_personal_skills" ~/.claude/skills "*/"
install_assets "Claude Code subagents"       "$SOURCE_DIR/claude_subagents"       ~/.claude/agents "*.md"
install_assets "Cursor personal skills"      "$SOURCE_DIR/cursor_personal_skills" ~/.cursor/skills-cursor "*/"
install_assets "Cursor subagents"            "$SOURCE_DIR/cursor_subagents"       ~/.cursor/agents "*.md"

Comment on lines +34 to +42
else
# Running via curl - clone to temp directory
TEMP_DIR=$(mktemp -d)
trap 'rm -rf "$TEMP_DIR"' EXIT
info "Cloning ChernyCode repository..."
git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \
error "Failed to clone repository. Check your internet connection."
SOURCE_DIR="$TEMP_DIR"
success "Repository cloned"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing git prerequisite check and suppressed clone diagnostics.

When run via curl | bash, git might not be installed. The 2>/dev/null on git clone swallows all diagnostic output, so the user only sees "Check your internet connection" even if the real problem is a missing git binary, an auth error, or a DNS issue.

Proposed fix
     # Running via curl - clone to temp directory
+    command -v git >/dev/null 2>&1 || error "git is not installed. Please install git first."
     TEMP_DIR=$(mktemp -d)
     trap 'rm -rf "$TEMP_DIR"' EXIT
     info "Cloning ChernyCode repository..."
-    git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \
+    git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" || \
         error "Failed to clone repository. Check your internet connection."
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
else
# Running via curl - clone to temp directory
TEMP_DIR=$(mktemp -d)
trap 'rm -rf "$TEMP_DIR"' EXIT
info "Cloning ChernyCode repository..."
git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \
error "Failed to clone repository. Check your internet connection."
SOURCE_DIR="$TEMP_DIR"
success "Repository cloned"
else
# Running via curl - clone to temp directory
command -v git >/dev/null 2>&1 || error "git is not installed. Please install git first."
TEMP_DIR=$(mktemp -d)
trap 'rm -rf "$TEMP_DIR"' EXIT
info "Cloning ChernyCode repository..."
git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" || \
error "Failed to clone repository. Check your internet connection."
SOURCE_DIR="$TEMP_DIR"
success "Repository cloned"
🤖 Prompt for AI Agents
In `@install.sh` around lines 34 - 42, Add a pre-check for the git binary and stop
suppressing git clone diagnostics: before using TEMP_DIR and running git clone,
verify git is available (e.g. check command -v git or which git) and call error
with a clear message like "git is required, please install git" if missing;
remove the redirection "2>/dev/null" from the git clone invocation so clone
failures surface real diagnostics (authentication/DNS/permission errors) and
keep the existing fallback that calls error "Failed to clone repository. Check
your internet connection." to preserve behavior when clone actually fails.

Comment on lines +124 to +125
if [[ ! -f ~/.claude/CLAUDE.md ]]; then
cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

No guard that CLAUDE.md exists in the source before copying.

If SOURCE_DIR/CLAUDE.md is absent (e.g., the file was renamed or the shallow clone was partial), cp fails and set -e aborts with an unhelpful message. A pre-check would improve the experience.

Proposed fix
 if [[ ! -f ~/.claude/CLAUDE.md ]]; then
-    cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md
-    success "Personal CLAUDE.md installed"
-    info "Edit ~/.claude/CLAUDE.md to customize your preferences"
+    if [[ -f "$SOURCE_DIR/CLAUDE.md" ]]; then
+        cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md
+        success "Personal CLAUDE.md installed"
+        info "Edit ~/.claude/CLAUDE.md to customize your preferences"
+    else
+        warn "CLAUDE.md not found in source, skipping"
+    fi
 else
🤖 Prompt for AI Agents
In `@install.sh` around lines 124 - 125, Before calling cp, ensure the source file
exists: add a test for [[ -f "$SOURCE_DIR/CLAUDE.md" ]] and only run cp
"$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md when that check passes; if the file
is missing, emit a clear message (using echo or logger) indicating
SOURCE_DIR/CLAUDE.md was not found and either skip the copy or exit with a
helpful error. Reference the variables/commands SOURCE_DIR, CLAUDE.md, and cp to
locate the exact spot to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant